package com.tuling.designpattern.factory.abstract1;

public class Client {
    public static void main(String[] args) {
        System.out.println("============小米系列产品====================");
        //小米工厂
        XiaomiFactory xiaomiFactory = new XiaomiFactory();
        IphoneProduct xiaomiPhone = xiaomiFactory.iphoneProduct();
        xiaomiPhone.start();
        xiaomiPhone.shutdown();
        xiaomiPhone.callup();
        xiaomiPhone.sendSMS();

        IRouterProduct xiaomiRouter = xiaomiFactory.routerProduct();
        xiaomiRouter.start();
        xiaomiRouter.setting();
        xiaomiRouter.openWife();
        xiaomiRouter.setting();

        System.out.println("============华为系列产品====================");
        //华为工厂
        HuaweiFactory huaweiFactory = new HuaweiFactory();
        IphoneProduct huaweiPhone = huaweiFactory.iphoneProduct();
        huaweiPhone.start();
        huaweiPhone.shutdown();
        huaweiPhone.callup();
        huaweiPhone.sendSMS();

        IRouterProduct huaweiRouter = huaweiFactory.routerProduct();
        huaweiRouter.start();
        huaweiRouter.setting();
        huaweiRouter.openWife();
        huaweiRouter.setting();

    }
}
